<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/4 0004
 * Time: 22:49
 */
namespace  common\widgets\banner;
use yii\bootstrap\Widget;

class BannerWidget extends Widget{
    public $item=[];
    public function init()
    {
        if (empty($this->item)){
            $this->item=[
                [   'label'=>'demo',
                    'image_url'=>'../image/5.jpg',
                    'url'=>'site\index',
                    'html'=>'',
                    'active'=>'active'
                ],
                [
                    'label'=>'demo',
                    'image_url'=>'../image/6.jpg',
                    'url'=>'site\index',
                    'html'=>"",


                ],
                [
                    'label'=>'demo',
                    'image_url'=>'../image/7.jpg',
                    'url'=>'site\index',
                    'html'=>"",

                ],

        ];
    }
    }
    public function run()
    {
        $data['item']=$this->item;
        return $this->render('index',['data'=>$data]);
    }

}